-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new database Table
and schema for wf_requests
#1932
Add new database Table
and schema for wf_requests
#1932
Conversation
db/structs.go
Outdated
type WfRequest struct { | ||
ID uint `gorm:"primaryKey;autoIncrement" json:"id"` | ||
RequestID string `gorm:"unique;not null" json:"request_id"` | ||
Status string `json:"status"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aliraza556 please can you make Status an enum of NEW
,PENDING
, COMPLETED
or FAILED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobi-bams, added
db/structs.go
Outdated
ID uint `gorm:"primaryKey;autoIncrement" json:"id"` | ||
RequestID string `gorm:"unique;not null" json:"request_id"` | ||
Status string `json:"status"` | ||
RequestData JSONB `json:"request_data"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is there a reason why you are not using gorm
for RequestData?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobi-bams address
Hi @tobi-bams, Please review this PR. |
type WfRequestStatus string | ||
|
||
const ( | ||
StatusNew WfRequestStatus = "NEW" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aliraza556 I don't think NEW
is a status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elraphty, for now NEW
is a valid state this will be the default state before we send to stakwork. When stakwork sends back a project_id then we can update it to PENDING
. I and @humansinstitute agreed to this, but if you have a better status name that will be nice we just came up with that on the fly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! Okay bro, will merge now.
Describe the changes:
table
and schema forwf_requests
closes: #1925
Issue ticket number and link:
Evidence:
https://www.loom.com/share/468858d24fdf4421a435f0e27479d228
Checklist before requesting a review